pspnet_adhoc.h File Reference

Go to the source code of this file.

Data Structures

struct  pdpStatStruct
 PDP status structure. More...

Functions

int sceNetAdhocInit (void)
 Initialise the adhoc library.
int sceNetAdhocTerm (void)
 Terminate the adhoc library.
int sceNetAdhocPdpCreate (char *mac, int port, unsigned int unk2, int unk3)
 Create a PDP object.
int sceNetAdhocPdpDelete (int id, int unk1)
 Delete a PDP object.
int sceNetAdhocPdpSend (int id, char *destMacAddr, int16 port, void *data, unsigned int len, int unk6, int unk7)
 Set a PDP packet to a destination.
int sceNetAdhocPdpRecv (int id, char *srcMacAddr, int *port, void *data, void *dataLength, int unk6, int unk7)
 Receive a PDP packet.
int sceNetAdhocGetPdpStat (int *size, pdpStatStruct *stat)
 Get the status of all PDP objects.


Function Documentation

int sceNetAdhocGetPdpStat int *  size,
pdpStatStruct stat
 

Get the status of all PDP objects.

Parameters:
size - Pointer to the size of the stat array (e.g 20 for one structure)
stat - Pointer to a list of pspStatStruct structures.
Returns:
0 on success, < 0 on error

int sceNetAdhocInit void   ) 
 

Initialise the adhoc library.

Returns:
0 on success, < 0 on error

int sceNetAdhocPdpCreate char *  mac,
int  port,
unsigned int  unk2,
int  unk3
 

Create a PDP object.

Parameters:
mac - Your MAC address (from sceWlanGetEtherAddr)
port - Port to use, lumines uses 0x309
unk2 - Unknown, lumines sets to 0x400
unk3 - Unknown, lumines sets to 0
Returns:
The ID of the PDP object (< 0 on error)

int sceNetAdhocPdpDelete int  id,
int  unk1
 

Delete a PDP object.

Parameters:
id - The ID returned from sceNetAdhocPdpCreate
unk1 - Unknown, set to 0
Returns:
0 on success, < 0 on error

int sceNetAdhocPdpRecv int  id,
char *  srcMacAddr,
int *  port,
void *  data,
void *  dataLength,
int  unk6,
int  unk7
 

Receive a PDP packet.

Parameters:
id - The ID of the PDP object, as returned by sceNetAdhocPdpCreate
srcMacAddr - Buffer to hold the source mac address of the sender
port - Buffer to hold the port number of he received data
data - Data buffer
dataLength - The length of the data buffer
unk6 - Set to 0
unk7 - Set to 0
Returns:
Number of bytes received, < 0 on error.

int sceNetAdhocPdpSend int  id,
char *  destMacAddr,
int16  port,
void *  data,
unsigned int  len,
int  unk6,
int  unk7
 

Set a PDP packet to a destination.

Parameters:
id - The ID as returned by sceNetAdhocPdpCreate
destMacAddr - The destination MAC address, can be set to all 0xFF for broadcast
port - The port to send to
data - The data to send
len - The length of the data.
unk6 - Unknown, set to 0
unk7 - Unknown, set to 0
Returns:
Bytes sent, < 0 on error

int sceNetAdhocTerm void   ) 
 

Terminate the adhoc library.

Returns:
0 on success, < 0 on error


Generated on Tue Nov 21 11:46:04 2006 for pspsdk-1.0+beta2 by  doxygen 1.4.6